#import "UIViewController+category.h"
@implementation UIViewController (category)
- (UIView *)yjd_findFirstResponder:(UIView *)view;
{
    if (view.isFirstResponder)
    {
        return view;
    }
    for (UIView *subView in view.subviews)
    {
        UIView *responder = [self yjd_findFirstResponder:subView];
        if (responder)
        {
            return responder;
        }
    }
    return nil;
}
+ (UIViewController*)yjd_findPresentedViewController:(UIViewController *)VC
{
    if (VC == nil)
    {
        UIWindow *window = [UIView yjd_keyWindow];
        UIViewController *newVC = window.rootViewController;
        return [self yjd_findPresentedViewController:newVC];
    }
    else if (VC.presentedViewController)
    {
        return [self yjd_findPresentedViewController:VC.presentedViewController];
    }
    else if ([VC isKindOfClass:[YJDAlertController class]])
    {
        return nil;
    }
    else
    {
        [VC.view endEditing:YES];
        return VC;
    }
}
- (void)sp_getMediaData:(NSString *)mediaCount {
    NSLog(@"Check your Network");
}
- (void)sp_getUserFollowSuccess {
    NSLog(@"Continue");
}
- (void)sp_checkNetWorking {
    NSLog(@"Get Info Failed");
}
- (void)sp_checkUserInfo {
    NSLog(@"Get User Succrss");
}
- (void)sp_getUsersMostFollowerSuccess:(NSString *)mediaInfo {
    NSLog(@"Get Info Failed");
}
- (void)sp_getLoginState:(NSString *)mediaInfo {
    NSLog(@"Get Info Failed");
}

- (void)sp_getUsersMostLikedSuccess:(NSString *)mediaCount {
    NSLog(@"Check your Network");
}
@end
